@extends('Admin.layouts.application')
@section('css')
    <link rel="stylesheet" href="/assets/xSystem/vendor/daterangepicker/daterangepicker.css">

@endsection
@section('content')
    <div class="admin-content">
        <div class="admin-content-body">
            <div class="am-cf am-padding am-padding-bottom-0">
                <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">主页背景管理</strong> /
                    <small>Home background management</small>
                </div>
            </div>

            <hr>
            @include('Admin.layouts._flash')

            <div class="am-g">
                <div class="am-u-sm-12">
                    <form class="am-form">

                        <table class="am-table am-table-striped am-table-hover table-main">
                            <thead>
                            <tr>
                                <th class="table-id">编号</th>
                                <th class="table-thumb">logo</th>

                                <th class="table-thumb">欢迎词</th>
                                <th class="am-hide-sm-only">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            @if(!empty($main))
                                <tr data-id="{{$main->id}}" class="xParent">
                                    <td>{{$main->id}}</td>
                                    <td>
                                        @if($main->thumb)<img width="100" height="50" src="{{$main->thumb}}" alt=""
                                                             class="logo">@endif
                                    </td>

                                    <td>

                                        {{cut_utf8($main->salutatory,49)}}

                                    </td>
                                    <td>
                                        <div class="am-btn-toolbar">
                                            <div class="am-btn-group am-btn-group-xs">
                                                <a class="am-btn am-btn-default am-btn-xs am-text-secondary"
                                                   href="{{route('main.edit', $main->id)}}">
                                                    <span class="am-icon-pencil-square-o"></span> 编辑
                                                </a>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                            @endif
                            </tbody>
                        </table>
                    </form>
                </div>
            </div>
        </div>
        @include('Admin.layouts._footer')

    </div>
@endsection

@section('js')

    <script src="/assets/xSystem/vendor/daterangepicker/moment.js"></script>
    <script src="/assets/xSystem/vendor/moment/locale/zh-cn.js"></script>
    <script src="/assets/xSystem/vendor/daterangepicker/daterangepicker.js"></script>

    <script src="/assets/xSystem/js/daterange_config.js"></script>

@endsection





